{template "header.html"}
{template "index-fanhui.html"}
<script>
/*一级*/
function dr_add_son_yiji(index,yijiid) {
    dr_iframe("{dr_lang('添加一级分类')}", "{dr_member_url($uriprefix.'/son_add_yiji', ['cid'=>$index.id,])}&yijiid="+yijiid, '100%', '100%');
}
function dr_edit_son_yiji(id) {
    dr_iframe("{dr_lang('修改一级分类')}", "{dr_member_url($uriprefix.'/son_edit_yiji', ['cid'=>$index.id])}&id="+id, '100%', '100%');
}
function dr_del_son_yiji(id,tieid) {
    dr_ajax_option('{dr_member_url($uriprefix.'/son_del_yiji', ['cid'=>$index.id])}&id='+id+'&tieid='+tieid, '{dr_lang('你确定要删除吗？')}', 1)
}

function dr_edit_son_type(tid) {
    dr_iframe("{dr_lang('修改分类')}", "{dr_member_url($uriprefix.'/son_edit', ['cid'=>$index.id])}&tid="+tid, '100%', '100%');
}

function dr_add_son_type() {
    dr_iframe("{dr_lang('添加分类')}", "{dr_member_url($uriprefix.'/son_add', ['cid'=>$index.id])}", '100%', '100%');
}
function dr_add_son_erji(id,yijiid) {
    dr_iframe("{dr_lang('添加二级分类')}", "{dr_member_url($uriprefix.'/son_add_erji', ['cid'=>$index.id,])}&yijiid="+yijiid+"&id="+id, '100%', '100%');
}
function dr_edit_son_erji(id) {
    dr_iframe("{dr_lang('修改二级分类')}", "{dr_member_url($uriprefix.'/son_edit_erji', ['cid'=>$index.id])}&id="+id, '100%', '100%');
}
function dr_del_son_erji(id,tieid) {
    dr_ajax_option('{dr_member_url($uriprefix.'/son_del_erji', ['cid'=>$index.id])}&id='+id+'&tieid='+tieid, '{dr_lang('你确定要删除吗？')}', 1)
}
function dr_add_son_type_er() {
    dr_iframe("{dr_lang('小栏目分类')}", "{dr_member_url($uriprefix.'/son_edit', ['cid'=>$index.id])}&tid="+tid, '100%', '100%');
}
function dr_del_son_type(tid) {
    dr_ajax_option('{dr_member_url($uriprefix.'/son_del', ['cid'=>$index.id])}&tid='+tid, '{dr_lang('此操作将联动删除本类下的全部帖子，你确定要删除吗？')}', 1)
}

</script>
<script src="{THEME_PATH}assets/js/admin.js" type="text/javascript"></script>

<div class="d-clear"></div>
<form class="" role="form" id="myform">
<div class="d-container ">
	<div class="d-row">
		<div class="d-col-md-8-juzhong">
			<div class="d-kuan d-beijing-baise d-yuanjiao-10" >
				<div class="d-neikuang-20 ">
					{php $erjibiao = '1_'.MOD_DIR.'_fenlei';}
					{table table=$erjibiao yijiid=0 cid=$index.id order=paixu_asc num=100 return=t}
					    <div class="d-kuan d-buhuanhang">
					    	<div class="d-hanggao-30 d-kuan d-beijing-hei-d9 d-xia-10 d-yuanjiao-10 pull-left">
					    		<span class="d-zuo-10">{$t.id} - {$t['name']} - {if $t['moren']==1}（默认）{/if}</span>
					    	</div>
					    	<a class="d-zuo-10 d-kuan-100 d-hanggao-30 pull-right" href="javascript:dr_add_son_erji({$t.id},{$index.id});">
					    		<i class="fa fa-plus-square-o"></i> 二级
					    	</a>
					    	<a class="d-zuo-10 d-kuan-100 d-hanggao-30 pull-right" href="javascript:dr_edit_son_yiji({$t.id});">
					    		<i class="fa fa-edit"></i> 修改
					    	</a>
					    	<a class="d-kuan-100 d-hanggao-30 pull-right" href="javascript:dr_del_son_yiji({$t.id},{$index.id});">
					    		<i class="fa fa-trash"></i> 删除
					    	</a>
					    </div>
					    <div class="d-clear"></div>
						{table table=$erjibiao yijiid=$t.id order=paixu_asc num=100 return=tt}
						<div class="d-kuan d-buhuanhang">
							<div class="d-hanggao-30 d-kuan d-xia-10 d-yuanjiao-10 pull-left">
								<span class="d-zuo-10">{$tt['id']} - {$tt['name']}</span>
							</div>
							<a class="d-zuo-10 d-kuan-100 d-hanggao-30 pull-right">
								
							</a>
							<a class="d-zuo-10 d-kuan-100 d-hanggao-30 pull-right" href="javascript:dr_edit_son_erji({$tt.id});">
								<i class="fa fa-edit"></i> 修改
							</a>
							<a class="d-kuan-100 d-hanggao-30 pull-right" href="javascript:dr_del_son_erji({$tt.id},{$index.id});">
								<i class="fa fa-trash"></i> 删除
							</a>
						</div>
						<div class="d-clear"></div>
						{/table}
					{/table}
					<div class="d-clear"></div>
					
					
					
				</div>
				<div class="d-neikuang-20 ">
					<a class="btn btn-circle  btn-default" href="javascript:dr_add_son_yiji({$index.id},0);">
						<i class="fa fa-plus"></i> 创建分类
					</a>
				</div>
			</div>
		</div>
	</div>
</div>
</form>

{template "fanhui.html"}

{template "footer.html"}